﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
    public const string Alphabet = "QWERTYUIOPASDFGHJKLZXCVBNM";
    public const int MaxLength = 1000;

    private static List<string> GetRandomData(string input)
    {
        var list = new List<string>();

        for (int i = 0; i < MaxLength; i++)
        {
            var r = new Random(System.Environment.TickCount);
            var cl = r.Next(1, 5);
            var item = input.Clone().ToString();
            for (int j = 0; j < cl; j++)
                item += Alphabet[new Random(System.Environment.TickCount).Next(0, Alphabet.Length)];
            list.Add(item);
        }

        return list;
    }

    [System.Web.Services.WebMethod(false)]
    [System.Web.Script.Services.ScriptMethod()]
    public static IEnumerable<string> GetData(string input, int pageIndex, int pageSize)
    {
        return GetRandomData(input).Skip(pageIndex * pageSize).Take(pageSize);
    }
}